package com.yanqu.road.server.pb;

import com.yanqu.road.entity.activity.stronghold.StrongholdEliminateDefendPatrons;
import com.yanqu.road.logic.pb.PatronsPb;
import com.yanqu.road.logic.pb.PlayerBasePb;
import com.yanqu.road.pb.activity.StrongholdWarProto;

public class StrongholdPb {
    public static  StrongholdWarProto.UnionMemberDispatchPatronsTempMsg.Builder parseUnionMemberDispatchPatronsTempMsg(StrongholdEliminateDefendPatrons patrons) {
        StrongholdWarProto.UnionMemberDispatchPatronsTempMsg.Builder temp = StrongholdWarProto.UnionMemberDispatchPatronsTempMsg.newBuilder();
        temp.setPlayerData(PlayerBasePb.parsePlayerBaseTempMsg(patrons.getUserBaseInfo()));
        temp.setPatrons(PatronsPb.parsePatronsTempMsg(patrons.getPatrons()));
        temp.setEarnSpeed(patrons.getEarnSpeed().longValue());
        temp.setBlood(patrons.getTotalBlood().longValue());
        temp.setUserId(patrons.getUserId());
        return temp;
    }
}
